package com.wsc.crawler;

/*
 * this interface contains all constant operations that are taken place when the
 * communication  b/w crawler and Frontier is carrying.
 * 
 *  Here the names 
 *  	*starts with 'P_' are application path of the frontier.
 *  	*starts with 'O_' are operation values.
 *   
 */
public interface CrawlerOperations {

	// context path of listner socket in crawler.
	String P_CONTEXT_PATH="/";
	
	// Operation is a parameter, used in client and server communication.
	
	String OPERATION = "operation" ;
	
	String O_CRAWLER_STOP =  "stop";
	// This Operation value is used to indicate the Frontier that crawler posted urls to insert to DB.
	
	String O_CRAWLER_POST = "urlsposted";
	
	//This operation is used to check the liveness of the crawler.
	
	String O_CRAWLER_HEARTBEAT = "heartbeat";
	
	
	// add number of urls to be get, at where the request made.
	
	String O_CRAWLER_GETURLS = "geturls";
	
	// visited status of a URL while crawling,
	
	String O_CRAWLER_VS_REQUEST= "vs_request";
	
	
	// this Acknowledge operation is sent to Controller when crawler is started  
	
	String O_CRAWLER_ACKNOLEDGE_MSG = "amfine";
	
	// this operation request is sent to Frontier and Indexer Servers, whether they are up on ports mentioned
	// in crawler-core.xml 
	// When one of the servers receive this request, they will respond with the same message sent, but should convert 
	// the message "ABC" to lower case i.e "abc".
	
	String O_CRAWLER_IS_REACHABLE = "ABC";

	String O_START_CRAWLER = "start";
	
}
